home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / mac / soundutl / rvrb52cp.hqx / Reverb v5.2 folder / Reverb programs / Symbols < prev    next >
Encoding:
Text File  |  1993-09-16  |  640 b   |  37 lines

  1. //
  2. // Example of using symbols and multiline macros
  3. // to cascade filters without having to specify
  4. // each delay line address. The macros keep track
  5. // of the current delay line address using the
  6. // symbol "addr".
  7. //
  8. // Bill Gardner, March, 1993.
  9. //
  10.  
  11. #macro do_input(src)
  12. set("addr", 0);
  13. move(src, addr)
  14. #endm
  15.  
  16. #macro do_output(dest)
  17. move(addr, dest)
  18. #endm
  19.  
  20. #macro do_comb(delay, gain)
  21. comb(addr, addr+delay, gain);
  22. set("addr", addr+delay)
  23. #endm
  24.  
  25. #macro do_delay(delay)
  26. set("addr", addr+delay)
  27. #endm
  28.  
  29. //
  30. // Cascade a 1000 sample comb filter with a 500
  31. // sample delay.
  32. //
  33. do_input(Lin);
  34. do_comb(4000, 0.5);
  35. do_delay(500);
  36. do_output(Lout);
  37.